clear all; close all;

specieslist = cell(10,1); 

specieslist{1} = 'Abalone';
specieslist{2} = 'Arbacia';
specieslist{3} = 'Bull';
specieslist{4} = 'Ciona';
specieslist{5} = 'Human-high';
specieslist{6} = 'Human-low';
specieslist{7} = 'Lpictus';
specieslist{8} = 'Lvariegatus';
specieslist{9} = 'Spurpuratus';
specieslist{10} = 'Zebrafish';

colors{1} = [0 1 1];
colors{2} = [1 0 0];
colors{3} = [0 0 1];
colors{4} = [1 0 1];
colors{5} = [0 0 1];
colors{6} = [0 0 1];
colors{7} = [1 0 0];
colors{8} = [1 0 0];
colors{9} = [1 0 0];
colors{10} = [0 1 0];

plotInds = [1 9 4 10 3 6];% 2 5 6 7];

symb = 'oooopvs^vo';
datadate = '200617B';

for k=plotInds
   load([specieslist{k} '_' datadate '.mat']);
   
   for i = (kfolds(1)*kfolds(2)):-1:1
   sv = diag(S_temp{i});
       if length(sv)<30
           sv = [sv; zeros(30-length(sv),1)];
       end
   s(:,i) = cumsum(sv.^2) ./ sum(sv.^2);
   end
   meanS = mean(s,2);
   
   
   
   figure(30);
   plot(meanS,'-','LineWidth',1.5,'Color',colors{k});
   
   hold on;
   
end

actualSpecies{1} = 'H. rufescens';
actualSpecies{2} = 'A. punctulata';
actualSpecies{3} = 'B. taurus';
actualSpecies{4} = 'C. intestinalis';
actualSpecies{5} = 'H. sapiens (viscous)';
actualSpecies{6} = 'H. sapiens';
actualSpecies{7} = 'L. pictus';
actualSpecies{8} = 'L. variegatus';
actualSpecies{9} = 'S. purpuratus';
actualSpecies{10} = 'D. rerio';


set(gca,'XLim',[0 20],'YLim',[0 1],'XTick',[0 5 10 15 20],'YTick',[0 0.2 0.4 0.6 0.8 1.0])
xlabel('Mode Number, n'); ylabel('Cumulative Mode Energy');
legend(actualSpecies{plotInds});